from typing import List


def list_sum(demo_list: List):
    if len(demo_list) == 1:
        return demo_list[0]
    else:
        return demo_list[0] + list_sum(demo_list[1:])


if __name__ == '__main__':
    demo_list = [1, 3, 5, 7, 9]
    s = list_sum(demo_list)
    print(s)
